package cur.nature.tinyorm.core.common;

import com.alibaba.fastjson2.JSON;

import java.util.Collection;

public class OrmUtil {
    public static boolean isEmpty(CharSequence str) {
        return str == null || str.length() == 0;
    }

    public static boolean isNotEmpty(String prefix) {
        return !isEmpty(prefix);
    }

    public  static String convertArrayToStr(Collection target){
        if(null == target){return null;}
        String res = JSON.toJSONString(target);
        return res.substring(1, res.length()-1).replace("\"", "'");
    }
}
